﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using HandlingInput;
using GameCore;

namespace GameObject
{
    public class Stone: StaticObject
    {
        public override bool CanActack()
        {
            return false;
        }

        public override bool Init(int _numberSprite, string[] strResource, string Name)
        {
            return base.Init(_numberSprite, strResource, Name);
        }

        public override void Update(GameTime gameTime, float x, float y, int w, int h)
        {
            this.X = x;
            this.Y = y;
            this.Width = w;
            this.Height = h;

            EventHandle.Update();

            _lsprite.Clear();
            _lsprite.Add(new Vector2(0, 0));

            base.Update(gameTime, x, y, w, h);
        }
        public override VisibleGameObject Clone()
        {
            VisibleGameObject newObj = new Stone();
            newObj._lsprite = this._lsprite;
            newObj._nsprite = this._nsprite;
            newObj._sprite = new Sprite[_nsprite];
            for (int i = 0; i < _nsprite; i++)
            {
                newObj._sprite[i] = this._sprite[i].Clone();
            }
            newObj.X = this.X;
            newObj.Y = this.Y;
            newObj.Height = this.Height;
            newObj.Width = this.Width;

            ((Stone)newObj).Name = Name;
            ((Stone)newObj).Object_iD = Object_iD ;
            for (int i = 0; i < List_Action.Count; i++)
            {
                ((Stone)newObj).List_Action.Add((ActionButton)List_Action[i].Clone());
            }

            return newObj;

        }
    }
}
